﻿
using ShineTech.Domain.SeedWork;
using System;

namespace ShineTech.Domain.Models.Users
{
    public class UsersByFiltersSpecification : SpecificationBase<User>
    {
        public UsersByFiltersSpecification(string name)
            : base(t => t.Name.Contains(name))
        {

        }
    }

    public class UserByIdSpecification : SpecificationBase<User>
    {
        public UserByIdSpecification(Guid id)
            : base(t => t.Id == id)
        {
        }
    }
    public class UserByEmailSpecification : SpecificationBase<User>
    {
        public UserByEmailSpecification(string email)
            : base(t => t.Email == email)
        {
        }
    }

    public class UserLoginSpecification : SpecificationBase<User>
    {
        public UserLoginSpecification(string email, string password)
            : base(t => t.Email == email.Trim() && t.Password == password.Trim())
        {
        }
    }
}
